package com.pick.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pick.admin.entity.SysUserPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 用户权限关联Mapper
 */
@Mapper
public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
    
    /**
     * 根据用户ID查询权限ID列表
     * @param userId 用户ID
     * @return 权限ID列表
     */
    @Select("SELECT permission_id FROM sys_user_permission WHERE user_id = #{userId}")
    List<Long> selectPermissionIdsByUserId(Long userId);
}